﻿using System;
using System.Runtime.InteropServices;

namespace AcSdk.Data
{
    [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Ansi)]
    [Serializable]
    public struct Static
    {
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
        public string SmVersion;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
        public string AcVersion;
        public int NumberOfSessions;
        public int NumCars;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
        public string CarModel;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
        public string Track;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
        public string PlayerName;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
        public string PlayerSurname;
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
        public string PlayerNick;
        public int SectorCount;
        public float MaxTorque;
        public float MaxPower;
        public int MaxRpm;
        public float MaxFuel;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        public float[] SuspensionMaxTravel;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
        public float[] TyreRadius;
    }
}
